To realize monitoring level data integration in DCS system using Modbus protocol - Database & Sql Blog Articles

Huaqiang Square Crystal Zhen full range of original stock
L0504-Murata muRata common mode inductor 90Ω 150mA

Data integration is the key in dcs systems. A typical DCS system can be structured into four layers: field level, control level, monitoring level, and management level. This article discusses the monitoring level. There are many parallel substations at this level. Generally, the computer is used as the interface of the machine. Each station can be divided into functions according to functions, and the corresponding field signals are collected and some local devices are controlled. However, the sites are not isolated. They must cooperate and coordinate to ensure product quality and continuous production. This requires each site to communicate with each other. In addition, the upper management network also needs to interact with the monitoring level substation to achieve global monitoring and optimization.

However, a substation is a heterogeneous system composed of different development platforms and different communication protocols, which may be developed by different manufacturers and individuals. It is cumbersome to write a conversion interface or driver for each protocol, especially when there are many sites and protocols. Therefore, how to effectively integrate data and avoid the emergence of information islands is one of the most difficult problems in DCS systems.

A better approach is to use a standard protocol for data communication at each site without having to develop a communication interface for each protocol. At present, there are many agreements in this area, and Modbus is one of them.

Digital camera

Introduction to 1Modbus Protocol

The Modbus protocol includes ASCII, RTU, PLUS, TCP, etc., and does not specify the physical layer. This protocol defines the message structures that the controller can recognize and use, regardless of the network through which they communicate. The standard Modicon controller implements serial Modbus using RS232C. RS232C specifies the connector pin, wiring, signal level, baud rate, parity and other information. Modbus's ASC water and RTU protocols specify the structure of the message, the data, the command and the answer. As shown in Figure 1. Data communication adopts Maser/Slave mode. The master sends a data request message. After receiving the correct message, the slave can send data to the master to respond to the request. The master can also directly send messages to modify the data of the slave to achieve bidirectional reading and writing.

Digital camera


Figure 2 is an example of a typical Modbus application. Modbus can be used between PIC and plc supporting Modbus protocol, between PLC and personal computer, between computer and computing, between remote PLC and computer, and between remote computer (via Modem connection). It can be seen that the application of Modbus is quite Extensive. Since Modbus is a de facto industry standard, many manufacturers' PLC, hmi, and configuration software support Modbus, and Modbus is an open standard. The protocol content can be obtained free of charge. Some small manufacturers and even individuals can develop according to the protocol standard. Supports Modbus products or software to bring its products to the Modbus data network. Therefore, Modbus has a wide application base.

In practical applications, you can use RS232, RS485/422, Modem plus telephone line, or even TCP/IP to network. Therefore, Modbus has many types of transmission media, which can be selected according to the transmission distance.

2Modbus specific application

The specific application of Modbus introduced here is the cement raw material production quality control system of a certain factory. There are 5 substations in this system: calcium iron analyzer, four element analyzer, material level/slurry plug, batching scale, and distribution library. Each substation consists of a computer and related software and hardware. The control system is composed as shown in Figure 3.

Digital camera

As can be seen from Figure 3, the system is basically two control loops: a route calcium iron analyzer, batching scale and control algorithm, to achieve pre-grinding, that is, online real-time closed-loop control of raw material quality; It consists of a four-element analyzer, a slurry plug, and a material level meter to realize the post-mixing, that is, the homogenization control of the slurry quality before entering the kiln. The library algorithm acts as a control, optimization, and network interface in the second loop. Changes in system control parameters are triggered by two events: the results of the calcium iron analyzer analysis and the results of the four-element analysis. The results of these two analyses were obtained from an analysis of the samples actually produced by the user on a regular basis. It can also be seen from Figure 3 that the stations are interconnected and their collaboration is related to the quality of raw material production.

In network design, not only the data exchange between stations should be realized, but also the flexibility, versatility and scalability of the network should be considered. For example, the data source site should be able to increase or decrease the data relatively easily, the target site may have multiple, the data flow direction should be bidirectional, and the data of all raw material systems needs to be sent to the plant-level DCS, so the implementation of the network is complicated.

Because Modbus protocol has the characteristics of diversity, reliability, etc., and it is an industrial-grade standard protocol, it can be suitable for specific applications. Therefore, the network is implemented by Modbus.

It is not possible to implement Modbus with the source program at each site. Because the application development platform is different, there is Visual C++, etc., and code reuse is impossible. However, the operation of reading and writing Modbus data at each site is the same. To solve this problem, we use COM technology. COM is also the standard for data communication between software modules. COM is characterized by language independence, transparency to time history, and binary reuse. Because its interface is open, clients that support COM technology can call the internal functions of COM components through their public interfaces. As we all know, in Windows 2000, COM+ even forms the basis of the operating system.

Finally, two COM components, the ModbusMaster component and the ModbusSlave component, were developed using ATL. ATL is a framework based on C++ simulation technology. It is mainly used in software development of COM. It can greatly simplify the development process of components and improve the efficiency of code [5]. Both Master and Slave components include ASCII, RTU, and TCP, which implement the functions specified by Class0 and Class1. The client program of each substation does not need to understand the specific protocol and implementation of Modbus. It only needs to call the method exposed by the component to exchange data with the remote computer to realize transparent Modbus protocol and transparent network data transmission. For example, on the Slave side, the client only needs to modify its connection data to make the change react to the Master. After the Master has modified the data, the Slave will trigger an event to notify the client.

Instead of using a point-to-point connection, the network structure uses a star connection to create a real-time database on a site, equivalent to a data center. All sites are only connected to the data center, and each station data is also sent to the data center. The network structure is shown in Figure 4.

Digital camera

3 Discussion

3.1 About specific applications

In the network structure shown in Figure 4, on the one hand, the system encapsulates the implementation of Modbus protocol and network, realizes function reuse, reduces repetitive operations, and makes network debugging more convenient; on the other hand, the star structure makes data increase. Adding sites is very convenient. In principle, each site can get data from any site without adding new connections. Under the network structure shown in Figure 4, it is convenient to connect the distribution library and the batching scale to realize the semi-library deployment (control the batching scale formula according to the slurry quality feedback), and increase the control loop to three. Some real-time data can also be stored in historical databases for long-term preservation and post-analysis queries.

3.2 Other features of the Modbus protocol

In addition to the wide range of features mentioned in the introduction, Modbus has other features. The Modbus protocol needs to verify the data. In addition to parity in the serial protocol, the ASCII mode uses LRC check, and the RTU mode uses 16-bit CRC check. However, the TCP mode has no additional checksum, because the TCP protocol is a A reliable connection-oriented protocol. In addition, Modbus uses the master-slave mode to send and receive data at regular intervals. In actual use, if a slave station is disconnected (such as a fault or shutdown), the master can diagnose it, and when the fault is repaired, the network can be automatically turned on. Therefore, the reliability of the Modbus protocol is better.

Modbus defines a number of functions and is considered comprehensive for practical applications in the industry. And the agreement is still evolving, users can also customize the function code. It can be seen that the scalability of Modbus is better.

For some repeatedly sent detection data, the Unsolicited mode can be adopted, that is, the Master does not need to send a request, and the Slave end actively sends data. This can reduce network data traffic to increase transmission speed. Therefore, the Modbus protocol application is also flexible.

3.3 Comparison with the NetDDE protocol

The NetDDE protocol has several shortcomings: First, the technology is too old, there is no 32-bit API on the Win98 platform, only 16-bit, so it is difficult to implement on a 32-bit platform, and NetDDE cannot implement serial connection; the second is to transmit data. The amount is small, and it is annoying to transfer batch data; the third is that it cannot be automatically restored after the connection is disconnected. Therefore, NetDDE is not used to implement our network.

3.4 New direction of industrial data integration

OPC is an open industry specification and standard for data communication between applications. It uses a client/server architecture based on OLE/COM technology to provide a standard interface for hardware vendors and application developers [6]. The advanced OPC structure, fast speed and powerful functions are the future development direction of industrial data integration. However, OPC is relatively novel, has high requirements for developers, and is difficult to develop. Moreover, OPC products are relatively expensive, and domestic DCS applications are not yet popular. Their promotion and development still require a process.

In short, Modbus has the advantages of openness, wide user range, easy implementation, good scalability and high reliability. Therefore, Modbus protocol and COM technology are used to realize the integration of monitoring data. The connection between the self-developed application and the connection with FOXBORO, ROSEMOUNT, CIMPLICITY and other DCS systems and HMI has achieved good results.

CAT6 Ethernet Cable

High-precision, Cat 6, EIA/TIA-568B.2 compliant, Ethernet LAN Patch Cable, pre-terminated with RJ45 connectors and available in a wide variety of colors for proper color coding of network connections.

Compatible with Ethernet 10BASE-T, 100BASE-TX(Fast Ethernet), 1000BASE-T (Gigabit Ethernet), 10GBASE-T (10-Gigabit Ethernet) and Peer-to-Peer, as well as any other devices that utilize 8P8C networking cables including telephony, home automation and long distance video transfer technologies like HMDI over Ethernet.

CAT6_02

Product Information:
1. Frequency - 250 MHz
2. Transmission Speed - 1000BASE-TX
3. Available Length - 0.5M~30M or Longer
4. Connectors - RJ45 Plug unshielded

5. Condcutor- 24AWG or 26AWG or 28AWG (America wire gague)

6. Cable Construction - unshielded or shielded

7. Jacket- PVC
8. Install - Used outdoor or indoor

CAT6_03

CAT6_04

CAT6_05-06

CAT6_07

CAT6_08 09

Applications: HP Server, Router switch Lan firewall Modern, Computer mac IP phones TV, Gaming system PS4 PS3 xbox 360 lan network networks networking switch TV ADSL computer laptop netgear TPlink router moderm NAS VoIP phones POE Server media players, PS3 PS4 Xbox360 gaming system.

CAT6_10

CAT6_10-2

Patch Cable,Cat6 Patch Cable,Cat 6 Ethernet,Cat6 Ethernet Patch Cable

Shenzhen Kingwire Electronics Co., Ltd. , https://www.kingwires.com